package com.powerbank.common.event;

import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 提现处理事件
 */
@Data
public class WithdrawalProcessedEvent {

    /**
     * 提现单号
     */
    private String withdrawalNo;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 提现金额
     */
    private BigDecimal amount;

    /**
     * 处理状态：SUCCESS-成功，FAILED-失败
     */
    private String status;

    /**
     * 创建时间
     */
    private LocalDateTime createdTime;

    public WithdrawalProcessedEvent() {
        this.createdTime = LocalDateTime.now();
    }

    public WithdrawalProcessedEvent(String withdrawalNo, Long userId, BigDecimal amount, String status) {
        this.withdrawalNo = withdrawalNo;
        this.userId = userId;
        this.amount = amount;
        this.status = status;
        this.createdTime = LocalDateTime.now();
    }
}